package com.jiyinit.web.core.activiti.dao;

import com.jiyinit.core.framework.dao.mybatis.base.MybatisDaoContext;
import com.jiyinit.web.core.activiti.dto.AttendanceRequest;
import com.jiyinit.web.core.activiti.vo.AttendanceEntity;
import com.jiyinit.web.core.business.entity.TabCoreOrgEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;

/**
 * @author liuzongguang
 * @date 2018/7/20.
 */
@Repository("core.mobileDataStatisticsDao")
public class MobileDataStatisticsDao {
    /**
     * 日志对象
     */
    private static Logger logger = LoggerFactory.getLogger(MobileDataStatisticsDao.class);

    private String SQLID = "core.mobileDataStatisticsDao.";

    @Autowired
    @Qualifier("core.MybatisDaoContext")
    private MybatisDaoContext mybatisDaoContext;

    public List<AttendanceEntity> getAttendanceInfo(AttendanceRequest attendanceRequest,List<TabCoreOrgEntity> list){
        HashMap<String,Object> params = new HashMap<>();
        params.put("timeStamp",attendanceRequest.getTimeStamp());
        params.put("list",list);
        return mybatisDaoContext.findAll(SQLID + "getAttendanceInfo",AttendanceEntity.class,params);
    }
}
